#include "mainwindow.h"
#include <QApplication>
#include <QFile>
#include <QTextStream>
#include <QStyleFactory>


#define USE_QSS 1
#include <QApplication>

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    QFont font;
    font.setPointSize(16);
    font.setFamily("Alibaba Sans");

    QApplication::setStyle(QStyleFactory::create("material"));
    qApp->setFont(font);

#if USE_QSS
    QFile f(":qdarkstyle/style.qss");
    if (!f.exists())
    {
        printf("Unable to set stylesheet, file not found\n");
    }
    else
    {
        f.open(QFile::ReadOnly | QFile::Text);
        QTextStream ts(&f);
        qApp->setStyleSheet(ts.readAll());
    }
#endif
    MainWindow w;
    //w.showFullScreen();
    w.show();
    return a.exec();

}
